﻿using System;
using olierFrm.WebFormDev.Cookie;

namespace WebFormDev
{
    public partial class wucTheme : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cboTheme.SelectedIndex = CTheme.ThemeIndex;
            }

        }

        public void AddStyle(string key,string value)
        {
            cboTheme.Style.Add(key, value);
        }

        protected void cboTheme_SelectedIndexChanged(object sender, EventArgs e)
        {
            CTheme.ThemeIndex = cboTheme.SelectedIndex;
            CTheme.Theme = cboTheme.SelectedItem.Value.ToString();
            Response.Redirect(Request.Url.ToString());

        }
    }
}